// app.js
import { apiCreateUserVisitLog,getAllDicData } from 'utils/http/api'

App({
  onLaunch() {
    // 展示本地存储能力
    const logs = wx.getStorageSync('logs') || []
    logs.unshift(Date.now())
    wx.setStorageSync('logs', logs)

    //获取字典信息
    getAllDicData().then(res=>{
      wx.setStorageSync('allDicData', res)
    })
    // 登录
    wx.login({
      success: res => {
        let params = {
          code: res.code
        }
      }
    })
  },
  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {
    return {
      title: "寻梦所居 在致俄遇见理想的家",
      desc: "寻梦所居 在致俄遇见理想的家",
      path: "/pages/index/index",
      imageUrl:"/img/share.jpg"
    };
  },

  globalData: {
    userInfo: null,
    loadingFlag: false,
  }
})
